﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using TrifleWCF.cn.com.webxml.webservice;
using System.ServiceModel;

namespace TrifleWCF
{
    [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple,
        InstanceContextMode = InstanceContextMode.PerCall)]
    public class Trifle : ITrifle
    {
        public string DelayedByeBye(int delayms)
        {
            Thread.Sleep(delayms);
            return "Bye Bye~!(" + delayms.ToString() + " ms delayed)";
        }

        public void TestBug()
        {
            qqOnlineWebService service = new qqOnlineWebService();
            service.qqCheckOnlineCompleted+=
                new qqCheckOnlineCompletedEventHandler(service_qqCheckOnlineCompleted);
            service.qqCheckOnlineAsync("176561148");
        }

        void service_qqCheckOnlineCompleted(object sender, qqCheckOnlineCompletedEventArgs e)
        {
            try
            {
                //throw new Exception("妈妈咪呀");
            }
            catch(Exception ex)
            {
                throw ex;
            }
        }
    }
}
